/**
 * The map in which the game will take place, therefore stores characters and has other needed information
 * Sub class tile
 * @author Scott Tong
 *
 */
public class Map {
	/**
	 * The object that is the map is an array of tiles (units in the map) 
	 */
	Tile[][] map;

	private class Tile{
		/**
		 * the unit or character currently on the tile
		 */
		private Character unit;
		/**
		 * Variable that tells if the tile is occupied. Default true
		 */
		private boolean isEmpty;
		/**
		 * Determines if the spot is passable
		 */
		private boolean isPassable;
		/**
		 * determines if the tile will hide a unit
		 */
		private boolean isBrush;
		/**
		 * determines if reinforcements can spawn on this tile
		 */
		private boolean isReinforce;
		/**
		 * The defense bonus the tile grants if none this value is 0
		 */
		private int defBonus;
		/**
		 * The dodge bonus the tile grants if none this value is 0
		 */
		private int dodgeBonus;
		/**
		 * The movement penalty the tile gives if none the value is 0
		 */
		private int movementPenalty;
		
		public Tile(Character unit, boolean isEmpty, boolean isPassable, boolean isBrush, 
				boolean isReinforce, int defBonus, int dodgeBonus, int movementPenalty){
			this.unit = unit;
			this.isEmpty = isEmpty;
			this.isPassable = isPassable;
			this.isBrush = isBrush;
			this.isReinforce = isReinforce;
			this.defBonus = defBonus;
			this.dodgeBonus = dodgeBonus;
			this.movementPenalty = movementPenalty;
		}
		
		public void setUnit(Character unit) {
			this.unit = unit;
		}
		public Character getUnit() {
			return unit;
		}
		public void setEmpty(boolean isEmpty) {
			this.isEmpty = isEmpty;
		}
		public boolean isEmpty() {
			return isEmpty;
		}
		public void setPassable(boolean isPassable) {
			this.isPassable = isPassable;
		}
		public boolean isPassable() {
			return isPassable;
		}
		public void setBrush(boolean isBrush) {
			this.isBrush = isBrush;
		}
		public boolean isBrush() {
			return isBrush;
		}
		public void setReinforce(boolean isReinforce) {
			this.isReinforce = isReinforce;
		}
		public boolean isReinforce() {
			return isReinforce;
		}
		public void setDefBonus(int defBonus) {
			this.defBonus = defBonus;
		}
		public int getDefBonus() {
			return defBonus;
		}
		public void setDodgeBonus(int dodgeBonus) {
			this.dodgeBonus = dodgeBonus;
		}
		public int getDodgeBonus() {
			return dodgeBonus;
		}
		public void setMovementPenalty(int movementPenalty) {
			this.movementPenalty = movementPenalty;
		}
		public int getMovementPenalty() {
			return movementPenalty;
		}
		
		
	}
}

